<template>
	<view class="login">
		<view class="head">
			<view class="title">
				<image src="../../static/img/tabbar/homeactive.png" mode=""></image>
				<text>注册您的AWE账号</text>
			</view>
		</view>
		
		<view class="content">
			<view class="title">输入好友邀请码，完成注册</view>
			<view class="form-box">
				<view class="tips">邀请码</view>
				<view class="input-box" @tap='KeyboarOpen'>
					<password-input :numLng='value' :plaintext="false"></password-input>
				</view>
				<number-keyboard tabBar ref='KeyboarHid' @input='inputVal' psdLength='6'></number-keyboard>
				<view class="footer">
					<button type="primary" @tap="nextStep">确定</button>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import numberKeyboard from '@/components/number-keyboard/number-keyboard.vue'
	import passwordInput from '@/components/password-input/password-input.vue'
	export default {
		numberKeyboard,
		passwordInput,
		data() {
			return {
				value: '',
				formData: {}
			}
		},
		onLoad() {
			//因为此时实例没有挂载完成，需要延迟操作
			// setTimeout(() => {
			// 	this.$refs.KeyboarHid.open()
			// }, 50)
		},
		methods: {
			//打开键盘
			KeyboarOpen(e) {
				this.$refs.KeyboarHid.open();
			},
			//输入的值
			inputVal(val) {
				this.value = val;
			},
			// 下一步
			nextStep() {
				uni.navigateTo({
					url: "./registerSuccess"
				})
			}
		}
	}
</script>

<style>
	@import url("@/common/login.css");
	.login .form-box .tips {
		line-height: 100rpx;
		text-align: center;
		margin-bottom: 30rpx;
	}
	.login .form-box .input-box {
		margin-bottom: 100rpx;
	}
	.login .form-box >>> .focus_move {
		color: #111;
		line-height: 120rpx;
	}
	.login .form-box >>> .psdTtemTxt {
		line-height: 120rpx;
	}
	.login .form-box >>> .psdTtem {
		height: 120rpx;
	}
</style>
